<?php	/*	检查登录	*/	function checkadmin(){		if( ! isset($_SESSION['username']) || ! isset($_SESSION['id']))      //验证session变量是否有定义		{			//未登录			die(				'<script>					alert("请先登录！！！");					window.location = "login.php";				</script>'			);			//header('location:login.php');			return false;		}		return true;	}